//
//  NSArray+TYCreated.m
//  TYFoundation
//
//  Created by devp on 14-10-30.
//  Copyright (c) 2014年 ND. All rights reserved.
//

#import "NSArray+TYCreated.h"

@implementation NSArray (TYCreated)
+ (instancetype)ty_parentCallerSymbolArray {
    NSString *sourceString = [[NSThread callStackSymbols] objectAtIndex:2];
    if (!sourceString) {
        return nil;
    }
    // Example: 1   UIKit                               0x00540c89 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1163
    NSCharacterSet *separatorSet = [NSCharacterSet characterSetWithCharactersInString:@" -[]+?.,"];
    NSMutableArray *array = [NSMutableArray arrayWithArray:[sourceString  componentsSeparatedByCharactersInSet:separatorSet]];
    [array removeObject:@""];
    
    return [array copy];
}
@end
